4D Chart v13CT INSERT EXPRESSION |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Chart v13
CT INSERT EXPRESSION
CT INSERT EXPRESSION
The CT INSERT EXPRESSION command inserts a reference to expression into the text object in the area described by scope.
If the object described by scope is not a text object, CT INSERT EXPRESSION does nothing. first and last determine where the reference is inserted. first is one less than the first character position to be replaced and last is the last character position to be replaced. If first equals last, no characters are replaced and the reference is inserted between first and first +1. If last is greater than the number of characters in the text object, CT INSERT EXPRESSION replaces characters from first to the end. expression is the text equivalent of any valid 4D expression that returns a value. expression can be a reference to any of the following: a field, a variable, a 4D function, a user-defined function (project method), a plug-in function, or a statement. The following table gives examples for each expression type:
The optional format parameter is the display format for the reference. This parameter is equivalent to choosing a format from the Format dialog box. Formats are referred to either by their number or their name. Formats are numbered in the order in which they appear in the list of the Format dialog box. If format is a one or two digit string, then the format applied to field is from the list. If format is not a one or two digit string, then it is compared to the text values of each format in the list. If it matches one of the values in the list, that format is applied. This means that you can refer to the first date format as either “19” or “Short”. If format is not in the list of formats, it is interpreted as a custom numeric format. If format is inappropriate for the resulting value of the reference, it is ignored. For instance, if you use a date format on a number, the number appears unformatted. This example creates a new text object, fills it with a reference to the 4D function Current date and formats it using the Long date format. $ID :=CT Draw text(Area;0.5;0.5;3.5;1;"Today's date is: ") |
PROPERTIES
Product: 4D Chart
INDEX HISTORY
Created: 4D Chart 1 SEE ALSO |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||